<template>
	<view>
		<u-cell-group>
			<u-cell-item v-for="(item, index) in accountType" :title="item.name" :key="accountType.groupType" @click="click(item.template, item.groupType)">
				<template v-slot:icon>
					<u-image width="80rpx" height="80rpx" :src="item.iconUrl">
					</u-image>
				</template>
			</u-cell-item>
		</u-cell-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				accountType: []
			}
		},
		onLoad() {
			this.accountType = this.$api.getAccountType();
		},
		methods: {
			click(template, gType) {
				let url = "template/" + template + "?gType=" + gType;
				uni.navigateTo({
					url: url
				})
			}
		},
	}
</script>

<style lang="scss">

</style>
